package cn.justweb;

import java.util.ArrayList;

/*
 *
 * 	创建一个存储学生对象的集合，存储3个学生对象，使用程序实现在控制台遍历该集合
 * */
public class Demo3 {
    public static void main(String[] args) {
        ArrayList<Student> list=new ArrayList<>();
        list.add(new Student("aa","11"));
        list.add(new Student("bb","22"));
        list.add(new Student("cc","33"));

        for (int i = 0; i < list.size(); i++) {
            Student student=list.get(i);
            System.out.println(student);
        }
    }
}
